using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Schemata.Core
{
    /// <summary>
    /// Represents an abstract schema provider.
    /// </summary>
    public abstract class SchemaProvider
    {
        /// <summary>
        /// Gets the columns.
        /// </summary>
        /// <param name="table">The table.</param>
        /// <returns></returns>
        public abstract List<ColumnSchema> GetColumns(TableSchema table);

        /// <summary>
        /// Gets the tables.
        /// </summary>
        /// <param name="database">The database.</param>
        /// <returns></returns>
        public abstract List<TableSchema> GetTables(DatabaseSchema database);

        /// <summary>
        /// Gets the type of the data.
        /// </summary>
        /// <param name="columnRow">The column row.</param>
        /// <returns></returns>
        public abstract DbType GetDataType( DataRow columnRow );

        /// <summary>
        /// Gets the foreign keys.
        /// </summary>
        /// <param name="table">The table.</param>
        /// <returns></returns>
        public abstract List<TableKeySchema> GetForeignKeys(TableSchema table);

        /// <summary>
        /// Gets the is primary key member.
        /// </summary>
        /// <param name="table">The table.</param>
        /// <param name="columnRow">The column row.</param>
        /// <returns></returns>
        public abstract bool GetIsPrimaryKeyMember(TableSchema table , DataRow columnRow);
    }
}
